﻿
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel.DataAnnotations.Schema;
namespace WinnerCMS.Model
{
    /// <summary>
    /// 列表
    /// </summary>
    public partial class Category
    {
        public Category()
        {
            Cores = new List<Core>();
            DeputyCores = new List<Core>();
            Gathers = new List<Gather>();
            Admins = new List<User>();
            Roles = new List<Role>();
        }

        public int Id { get; set; }
        public byte ModelId { get; set; }
        public string CategoryName { get; set; }
        public string CategoryNameEN { get; set; }
        public int? ParentId { get; set; }
        public int OrderId { get; set; }
        public string LinkUrl { get; set; }
        [Index]
        public string Path { get; set; }
        public string DomainName { get; set; }
        public string FilePostfix { get; set; }
        public string FilePrefix { get; set; }
        public int UrlStyle { get; set; }
        public string CategoryFilePostfix { get; set; }
        public string CategoryFilePrefix { get; set; }
        public int CategoryUrlStyle { get; set; }
        public string CategoryIntro { get; set; }
        public string CategoryPic { get; set; }
        public string CategoryDescription { get; set; }
        public string CategoryKeyWord { get; set; }

        /// <summary>
        /// 是否启用投稿
        /// </summary>
        public bool EnableContribute { get; set; }
        /// <summary>
        /// 是否启用评论
        /// </summary>
        public bool EnableComment { get; set; }
 
        public string TemplateFileName { get; set; }
        public string ShowPageTemplateFileName { get; set; }
        public string CategoryUrlFormat { get; set; }
        public string ContentUrlFormat { get; set; }

        public virtual Model Model { get; set; }
        /// <summary>
        /// 管理员
        /// </summary>
        public virtual ICollection<User> Admins { get; set; }

        public virtual ICollection<Gather> Gathers { get; set; }
        /// <summary>
        /// 栏目内容
        /// </summary>
        public virtual ICollection<Core> Cores { get; set; }
        /// <summary>
        /// 附属栏目的内容
        /// </summary>
        public virtual ICollection<Core> DeputyCores { get; set; }

        public virtual ICollection<Role> Roles { get; set; }
        [NotMapped]
        public string Link { get; set; }
        /// <summary>
        /// 排序移动动作
        /// </summary>
        [NotMapped]
        public string OrderType { get; set; }
    }
}